All right, so in the last part, we made it so that we basically have disabled our input, we've shown
our mouse cursor and we've gotten rid of the visibility for our player, character and player HUD.
So in this part, we are going to set a new animated camera view for our main menu.
That way we can have just a really nice backdrop for the menu screen.
So what we're going to do is we're going to grab a camera.
We're going to put it in here somewhere.
You know, obviously, you're just going need to find a nice area in your level, just frame it nicely
with the camera and then will animated.
So it kind of just rocks back and forth, back and forth slowly just to give a little bit more interest
and make our menu look a lot more professional.
So let's let's start out here by creating a new camera.
So we're just going to go to create we'll go to all classes and just find the camera right down here
near the bottom and to drag this in.
And I'm just going to find a nice place to position this.
In my case, I think that's a pretty fine camera view.
I can see a a preview of it down here in the bottom corner.
And what I'm going to do now is I'm going to create a new sequence.
So I'm just going to go over the basics of the sequence.
Ed, hopefully you're already familiar with it, but I'll give kind of a quick refresher here.
So the way we're going to do this is we're going to go up to the cinematics tab, going to hit ad level
sequence.
And I'm just going to put this in our main menu folder here, and I'll just call this cam slide.
That'll be a fine name, just something that we'll remember later.
And now we have our sequence or timeline.
So the way this works is we can grab actors from our level, add them to our sequence track here, and
then we can annotate you know, we can add in key frames for different values like the transform the
scale visibility material, all kinds of stuff to get all kinds of really nice advanced cinematics and
cut scenes and stuff like that.
If you do want an in-depth explanation, I do actually have another course that goes over the cinematics
and sequencer tab in detail.
So check that out if you're interested.
But just for the basics here, what we're going to do is we're going to select our camera in the viewport
here.
We're going to go down to the track button.
We're going to click this and go actor to sequencer right here.
We're going to go add camera actor.
Just click that.
And now we have added this so we can now adjust any of these, transform values, our location, rotation,
scale, and we can just click these plus buttons to add key frames for any of those values anywhere
on this track here.
And then you can see we have automatically animated it'll interpolation between all of these values
and just do cool stuff, which is exactly what we want.
So now that we've got this in here, first thing that we need to do is take our camera cuts track and
delete this.
So we're just going to delete that right there.
We don't need that for the way we're going to be doing things.
And then what we're going to do is we'll go into our transform here and in my case, I'm just going
to add a keyframe for the entire transform.
You could get really granular and you could just add a key frame for the location of the camera or the
rotation scale.
Obviously, the scale isn't really going to matter with a camera, but it's the option is available.
And then what I'll do is I'm going to go forward to frame 150 here and I'm just going to move the camera
over a little bit, maybe rotated a little here, maybe not quite that much.
Just something simple like this, and I will add another keyframe, and now we'll see if we look down
in the preview here, when we play our animation, you can see our camera nicely moves over to the right.
And then what we're going to do is we're going to copy this first set of key frames here and put that
at frame 300.
That way it'll perfectly feed back and then we can loop this animation over and over so that it'll basically
just move back and forth and just give us some nice motion as long as our players are in the middle.
So let's go back to our first keyframes here.
We're just going to box selectees by dragging across these keyframes, going to.
Right.
Click these.
I'm going to copy them.
You can also just control C, if you like, and then we're going to go forward to frame, uh, three
hundred.
Uh, let's get right in here.
Three hundred just like that.
Right click.
Go up to Paiste and transform.
You're just going to want to do that.
The first option here we can once again we can get granular and just paste in one of these values,
but we're just going to piece all of them by just like and transform there.
So now.
If we were OK, if we play this.
One thing we're going to see is the camera has just disappeared, so real quick, one thing that I should
mention is an unreal engine five by default, when you play a sequence, the viewport goes into game
mode, which is where unreal disables visibility on stuff like cameras and icons, basically just anything.
That's Ed, only just to give you a more clean view of what, you know, your animation or cinematic
is going to look like.
So if you want to disable that and actually see how your camera's moving, just go to the playback options
right here in your sequence and disable game view or clean playback mode.
And now when we play our animation here, we can see the camera moving nicely over and then it hits
this key frame here and it moves back again just like so.
And then when we loop this, you can see it's just going to go back.
And that is exactly what we want.
So I will say this.
This is all that we need to do here and now we just need to.
Activate this camera by changing our viewpoint to the viewpoint of the camera and playing the animation.
So let's go back to our level blueprint here, main menu level.
And after we set our mouse cursor, what we're going to do is we're going to set our view target.
Set a target with BLENDE and then we need to get a reference to our player controller.
So off of Target, we're just going to drag off here and say get player control.
There we go.
Get your controller.
And then we need to specify the new value target, which is going to be the camera that we want to take
the viewpoint of.
So we'll just go make sure we've got the camera actors selected here, hop back into the level blueprint
just right.
Click and create a reference to the camera actor.
Just plug this into the New Year target.
And that is all that we need to do with this note.
We don't we could we could set up one time, for example, if I was to set this blende time to like
five.
Then when I play you can see the camera blends from the viewpoint of the player character blueprint
to the camera.
But we're just going to set this to zero that we just instantly takes the the position of the camera
we want.
All right.
So next thing, we need to create a level sequence player.
So Strogoff creates a level sequence player and then we're going to specify which level sequence we
are going to create.
In this case, it can slide and then off of our return value, we're just going to loop.
And so we're going to use the play looping node and we're going to keep the number of loop set to negative
one.
And this makes it so that our animation will loop indefinitely.
You can set a value.
You could make it so that it loops only ten times as long, but negative one will make it so it goes
on forever.
And that is exactly what we want.
So we're going to compile save.
We can play our game to see this in action.
You can see, you know, we don't have a player character in the way we've got a brand new camera view.
It's animated.
It's going back and forth.
As you can see, it's looping.
And that is exactly what we need to have.
Just a nice backdrop for our menu.
You know, you could get really complicated with things, get real fancy and make it so that, you know,
your camera kind of flies through your map or something like that.
There's a lot of cool things that you can do with this.
But once again, it's just going to keep it simple for this so that you know what to do and then you
can work off it from there.
So that's going to be it for this part.
And I will see you in the next one.